package com.chenjie.executor.day18;


import lombok.Synchronized;

/**
 * packageName com.chenjie.executor.day09
 *
 * @author chenjie
 * @version JDK 8
 * @className Main1 (此处以class为例)
 * @date 2024/5/27
 * @description TODO
 */
public class Main {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        Task task=new Task();
        Thread thread = new Thread(task,"thread");
        Thread thread1 = new Thread(task,"thread1");
        Thread thread2 = new Thread(task,"thread2");
        thread.start();
        thread1.start();
        thread2.start();
        try {
            Thread.sleep(1000L);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        synchronized(task){
            task.notify();
        }
    }
}
